﻿using D3StatsClient.Model;
using D3StatsClient.View;
using D3StatsClient.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace D3StatsClient.Commands
{
    public class NewSession : CommandBase
    {
        public NewSession()
        {

        }

        public override bool CanExecute(object parameter)
        {
            var vm = ViewModelManager<MainWindowViewModel>.ViewModel;

            if (!vm.IsRecording)
            {
                return true;
            }

            return false;
        }

        public override void Execute(object parameter)
        {
            //Open new session window here, and set params.
            NewSessionWindow window = new NewSessionWindow();
            window.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            window.ShowDialog();
        }
    }
}
